// vite.config.js
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///E:/gll-xiangmu/gll_gw_new/node_modules/vite/dist/node/index.js";
import vue from "file:///E:/gll-xiangmu/gll_gw_new/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import AutoImport from "file:///E:/gll-xiangmu/gll_gw_new/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///E:/gll-xiangmu/gll_gw_new/node_modules/unplugin-vue-components/dist/vite.js";
import { ElementPlusResolver } from "file:///E:/gll-xiangmu/gll_gw_new/node_modules/unplugin-vue-components/dist/resolvers.js";
import compression from "file:///E:/gll-xiangmu/gll_gw_new/node_modules/vite-plugin-compression/dist/index.mjs";
var __vite_injected_original_import_meta_url = "file:///E:/gll-xiangmu/gll_gw_new/vite.config.js";
var vite_config_default = defineConfig({
  plugins: [
    vue(),
    AutoImport({
      resolvers: [ElementPlusResolver()]
    }),
    Components({
      resolvers: [ElementPlusResolver()]
    }),
    compression({
      algorithm: "gzip",
      // 指定压缩算法为gzip,[ 'gzip' , 'brotliCompress' ,'deflate' , 'deflateRaw']
      ext: ".gz",
      // 指定压缩后的文件扩展名为.gz
      threshold: 10240,
      // 仅对文件大小大于threshold的文件进行压缩，默认为10KB
      deleteOriginFile: false,
      // 是否删除原始文件，默认为false
      filter: /\.(js|css|json|html|ico|svg)(\?.*)?$/i,
      // 匹配要压缩的文件的正则表达式，默认为匹配.js、.css、.json、.html、.ico和.svg文件
      compressionOptions: { level: 9 },
      // 指定gzip压缩级别，默认为9（最高级别）
      verbose: true,
      //是否在控制台输出压缩结果
      disable: false
      //是否禁用插件
    })
  ],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
    }
  },
  build: {
    //打包命令
    outDir: "dist",
    // 指定构建输出的目录
    assetsDir: "assets",
    // 指定静态资源输出的目录
    minify: "terser",
    // 使用 Terser 插件压缩 JavaScript
    cssCodeSplit: true,
    //css代码分割
    terserOptions: {
      compress: {
        drop_console: true,
        // 移除 console 语句
        drop_debugger: true
        // 移除 debugger 语句
      },
      format: {
        comments: false
      }
      // output: {
      //   comments: false, // 去除所有注释
      // },
    },
    rollupOptions: {
      output: {
        chunkFileNames: "assets/js/[name]-[hash].js",
        // 自定义代码块文件名格式
        entryFileNames: "assets/js/[name]-[hash].js",
        // 自定义入口文件名格式
        assetFileNames: "assets/[ext]/[name]-[hash].[ext]",
        // 自定义资源文件名格式
        manualChunks: (id) => {
          if (id.includes("node_modules")) {
            return "vendor";
          }
        }
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJFOlxcXFxnbGwteGlhbmdtdVxcXFxnbGxfZ3dfbmV3XCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJFOlxcXFxnbGwteGlhbmdtdVxcXFxnbGxfZ3dfbmV3XFxcXHZpdGUuY29uZmlnLmpzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9FOi9nbGwteGlhbmdtdS9nbGxfZ3dfbmV3L3ZpdGUuY29uZmlnLmpzXCI7aW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSBcIm5vZGU6dXJsXCI7XG5pbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tIFwidml0ZVwiO1xuaW1wb3J0IHZ1ZSBmcm9tIFwiQHZpdGVqcy9wbHVnaW4tdnVlXCI7XG4vL1x1ODFFQVx1NTJBOFx1NjMwOVx1OTcwMC0tLS0tLS0wXG5pbXBvcnQgQXV0b0ltcG9ydCBmcm9tIFwidW5wbHVnaW4tYXV0by1pbXBv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